package com.yjd.comm.enums;

/**
 * 
 * <b>description</b>：api请求方式 <br>
 * <b>time</b>：2015-09-17下午2:26:30 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public enum ApiRequestWayEnum {

	WEB(1, "WEB"), APP(2, "手机APP");

	private Integer value;
	private String description;

	private ApiRequestWayEnum(Integer value, String description) {
		this.value = value;
		this.description = description;
	}

	public Integer getValue() {
		return value;
	}

	public String getDescription() {
		return description;
	}

	public static ApiRequestWayEnum get(Integer value) {
		ApiRequestWayEnum[] enums = ApiRequestWayEnum
				.values();
		for (ApiRequestWayEnum enum1 : enums) {
			if (enum1.getValue().equals(value)) {
				return enum1;
			}
		}
		return null;
	}

	public static String getDesc(Integer value) {
		ApiRequestWayEnum enum1 = ApiRequestWayEnum
				.get(value);
		return enum1 != null ? enum1.getDescription() : null;
	}

}
